package com.learn.tx;

import com.learn.annotation.Foo;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author chenxin
 * @time 2017-01-06-14:32
 */
@Service
public class TxMethod {
    JdbcTemplate jdbcTemplate;

    @Transactional
    @Foo
    public void addOne(TxObject param){
        param.setS("fffff");
        System.out.println("++++");
        throw new RuntimeException("tx ex");
    }
}
